home *** CD-ROM | disk | FTP | other *** search
- property ancestor
- global BUBBLESPRITES, gCarObj
-
- on new me
- set ancestor to new(script "bubbleScript")
- return me
- end
-
- on customstepframe me
- mainRoutine(me)
- end
-
- on mainRoutine me
- set horPos to the locH of sprite the CAR of gCarObj
- set verPos to the locV of sprite the CAR of gCarObj
- if horPos < 280 then
- set xPos to horPos + 15
- set hCode to 4
- else
- set xPos to horPos - 15
- set hCode to 2
- end if
- if verPos < 180 then
- set yPos to verPos + 15
- set vCode to 1
- else
- set yPos to verPos - 15
- set vCode to 3
- end if
- set the loc of sprite the spritenum of me to point(xPos, yPos)
- set the member of sprite the spritenum of me to member ("roll" & vCode & hCode & ".PCT")
- end
-